using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace PUCIT.eFCS.DataAccess.Models.Mapping
{
    public class actualUserMap : EntityTypeConfiguration<actualUser>
    {
        public actualUserMap()
        {
            // Primary Key
            this.HasKey(t => t.UserId);

            // Properties
            this.Property(t => t.username)
                .HasMaxLength(50);

            this.Property(t => t.email)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("actualUsers");
            this.Property(t => t.UserId).HasColumnName("UserId");
            this.Property(t => t.username).HasColumnName("username");
            this.Property(t => t.email).HasColumnName("email");
            this.Property(t => t.categoryId).HasColumnName("categoryId");
        }
    }
}
